/**
 * @file
 * @description  用户模块接口文件
 */

import request from "./request"


/**
 * @method
 * @description 搜索
 * @param {Object} model  查询模型
 */
export const goodslist = (model) => request.get('goods', {
  params: model
})

/**
 * @method
 * @description 添加商品模块接口
 * @param {Object} model 要添加的商品
 */
export const addGoods = (model) => request.post("goods",model)

/**
 * @method
 * @description 修改商品模块接口
 * @param {Object} model  要修改的商品
 */
export const updataGoods = (model) => request.put(`goods/${model.goods_id}`,model)

/**
 * @method
 * @description 删除商品模块接口
 * @param {Number} goods_id 要删除的商品Id
 */
export const delGoods = (goods_id) => request.delete(`goods/${goods_id}`)


export const cateList = (model) =>request.get("categories",{
  params:model
})